package com.piece.core.framework.util.message;

import com.piece.core.framework.support.dto.PayloadDTO;

public interface MessageOperator {

    /**
     * 发送消息准备执行逻辑
     */
    void prepareSend(PayloadDTO payload, String messageType) throws Exception;

    /**
     * 监听消息执行逻辑
     */
    void doReceive(PayloadDTO payload) throws Exception;

    /**
     * 检查已发送次数是否以达到最大值
     */
    boolean checkRetryLimit(PayloadDTO payload);
}
